#include "StdAfx.h"
#include "NtlPacketGM.h"

const char * s_packetName_GM[] =
{
	DECLARE_PACKET_NAME( GM_NOTIFY_SERVER_BEGIN ),
	DECLARE_PACKET_NAME( GM_HEARTBEAT ),
	DECLARE_PACKET_NAME( GM_REPORT_LOAD ),
	DECLARE_PACKET_NAME( GM_REPORT_CONNECTED_USER_INFO ),

	DECLARE_PACKET_NAME( GM_REPORT_MONSTER_STATISTICS_BEGIN ),
	DECLARE_PACKET_NAME( GM_REPORT_MONSTER_STATISTICS ),
	DECLARE_PACKET_NAME( GM_REPORT_MONSTER_STATISTICS_SENDING_PAUSED_NFY ),
	DECLARE_PACKET_NAME( GM_REPORT_MONSTER_STATISTICS_END ),

	DECLARE_PACKET_NAME( GM_USERCOUNT_RES ),
	DECLARE_PACKET_NAME( GM_SERVER_CONTROL_TURN_OFF_ALL_NFY ),
	DECLARE_PACKET_NAME( GM_LOGIN_REQ ),
	DECLARE_PACKET_NAME( GM_LOGOUT_REQ ),
	DECLARE_PACKET_NAME( GM_MOVE_REQ ),
	DECLARE_PACKET_NAME( GM_KICKOUT_RES ),	
	DECLARE_PACKET_NAME( GM_ON_PLAYER_INFO ),
	DECLARE_PACKET_NAME( GM_PING_REQ ),
	
};


//------------------------------------------------------------------
//
//------------------------------------------------------------------
const char * NtlGetPacketName_GM(WORD wOpCode)
{
	if( wOpCode < GM_OPCODE_BEGIN )
	{
		return "NOT DEFINED PACKET NAME : OPCODE LOW";
	}

	if( wOpCode > GM_OPCODE_END )
	{
		return "NOT DEFINED PACKET NAME : OPCODE HIGH";
	}

	int nIndex = wOpCode - GM_OPCODE_BEGIN;
	if( nIndex >= _countof( s_packetName_GM) )
	{
		return "OPCODE BUFFER OVERFLOW";
	}

	return s_packetName_GM[ nIndex ];
}
